package com.example.front.arrange;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * DependTask
 *
 * @author liming2
 * @date 2023/10/11 10:24
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public @interface TaskDependent {

    @AliasFor("dependencies")
    Class<? extends AbstractTask>[] value() default {};

    @AliasFor("value")
    Class<? extends AbstractTask>[] dependencies() default {};
}
